<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DB_Abstraction_AbstractFactory
 *
 * @author Fabio
 */
require_once ('IAbstractFactory.php');
class DB_Abstraction_AbstractFactory implements IAbstractFactory
{
    private function __construct() {} 
    public static function getFactory() 
    {
        $settings = Settings::getInstance();
        require_once ('IFactory.php');
        require_once ('DB_Abstraction_Factory.php');
        switch ($settings['DB_TYPE'])
        {
            case 'MYSQL':
                require_once('DB_Abstraction_Factory_MYSQL.php');
                $factory = new DB_Abstraction_Factory_MYSQL();
                break;
        }
        return $factory;
    }
}

?>
